import {http} from '../http';

const _HTTP = new http();

/**
 * 上传图片或文件
 * @returns {Promise<unknown>}
 */
export const upLoadFile = function (data, header) {
    console.log(data);
    console.log(header);

    return _HTTP.uploadImg({
        url: "/upload/doUpload",
        filePath: data.filePath,
        name: 'userfile',
        data: data.formData,
        header:header,
    })
}